package serivce;

import dao.OrderDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import untity.Order;

import java.util.List;

@Service
public class OrderServiceImp implements OrderService{

    @Autowired
    OrderDao orderDao;

    @Override
    public Boolean creatOrder(Order order) {
        Boolean flag=orderDao.creatOrder(order);
        return flag;
    }

    @Override
    public List<Order> searchOrder(String userId) {
        List<Order> list= orderDao.searchOrder(userId);
        for (Order o:list) {
            System.out.println(o);
        }
        return list;
    }
}
